<?
	/* View */
	define('PS', 1);
	include_once("../../defines.php");

	include_once('header.php');

	$PageName = 'interviews';
	include_once(PUBLIC_BEHIND_DIRECTORY . $PageName . '.php');
?>

<div id="contactContent" class="centerContent">
	<h1 class="titlePage">Entrevistas:</h1>
	<?
	if (count($Interviews) > 0){
	?>
	<div id="interviews">
	<?
	$counter = 0;
	foreach ($Interviews as $Interview){
		$arrImage = $Interview->getImage();
		if (empty($arrImage)){
			$Image = NO_IMAGE;
		}else{
			$Image = MAIN_IMAGES_NEWS_DIRECTORY . $arrImage[0]['name_file'];
			if (!file_exists($Image))
				$Image = NO_IMAGE;
			else 
				$Image = MAIN_IMAGES_NEWS_PATH . $arrImage[0]['name_file'];
		}
		$counter++;
	?>
		<div class="interview" data-path="entrevista" data-parameters="id=<?=$Interview->getId();?>&name=<?=urlencode($Interview->getUrl());?>">
			<img src="<?= PUBLIC_IMAGES_PATH;?>arrow.png" alt="arrow" /><span class="title"><?= $Interview->getTitle(); ?></span>
			<span class="date"><?= 'Fecha: ' . date('d/m/Y', strtotime($Interview->getCreated())) . '<br />Por: ' . utf8_encode($Interview->getUser()->getWholeName());?></span>
	<?
		if (!empty($Image))
			echo '<br /><img src="' . $Image . '" class="miniPicNews" />';
	?>
			<div class="clear"></div>
			<br />
		</div>
	<?
		if ($counter != count($Interviews))
			echo '<hr />';
	?>
	<?
	} 	
	?>
	</div>
	<?
	}else{
		echo '<span class="centerContent bold empty">' . $messages->getMessage("NotInformationToShow") . '</span><br />';
	}
	?>
</div>

<? include('footer.php'); ?>